This invention relates in general to color printer technology and, more particularly, to a color printer that employs cache memories for conversion of received computer-generated color values to printer color values.
Eight bit values (bytes) are used by personal computers (PC""s) to designate colors in a Red Green Blue (RGB) color space. The colors Red, Green, and Blue are the primary colors in a RGB color space. Each byte represents one primary color. Colors are selected by assigning values to the bytes representing each primary color. To produce colors, a PC uses combinations of values for the bytes to control the computer""s display device (e.g. a color monitor). Together these three byte (i.e. 24 bit) color value can represent over 16 million different colors. Each color is reproduced by appropriate control of the monitor""s color producing devices. When, however, a color laser printer is called upon to accurately reproduce that many color values, extensive color processing is required that adds significantly to the execution time of the printer.
Color laser printers use a Cyan Magenta Yellow (CMY) color space. As a result, each RGB color value sent from the PC to a color laser printer must be converted to a CMY color value. A simple color space conversion is represented by the equation:       [                            C                                      M                                      Y                      ]    =            [                                    1                                                1                                                1                              ]        -          [                                    R                                                G                                                B                              ]      
However, ink pigments are not perfect. Thus, in order to match screen colors on paper, extensive modification of the simple equation is required.
In order to reproduce a received color value, a color laser printer must convert the color value into a color command that is recognized by the laser printer engine. It is impractical to produce a color table map that will map all possible PC-generated input colors to laser engine color codes. As a result, many color laser printer drivers employ a cache scheme that is combined with a color table/map to accomplish the conversion. The procedures employed by the prior art color laser printers will be better understood by referring to FIGS. 1 and 2.
In FIG. 1, a high level block diagram illustrates a color laser printer 10 and a connected personal computer (PC) 12. PC 12 generates three byte color values to enable display 14 to display any of over 16 million colors. If hard copy is required of the displayed image, a three byte value 16 defining red, green, and blue values, is transferred as a PC-RGB value over interface connection 18 to PC-RGB register 20 in printer 10. A microprocessor 22 in printer 10 then truncates the received PC-RGB value into a cache address and stores the address value in a cache address register 24. The truncation action uses only the four least significant bits of each byte to make up a 12 bit address value. That address value is then utilized to address a color cache 26 to determine if, at that address, a source RGB value is stored that matches the value in PC-RGB register 20. If the color values matches, a corresponding xe2x80x9cdestinationxe2x80x9d CMY value is accessed from the same address in color cache 26 and is employed by microprocessor 22 to control color print engine 28. If no match is found, the value in PC-RGB register 20 is fed to a color map 30.
It will be understood that employing only the four least significant bits of each of the red, green and blue bytes in PC-RGB value 16 allowed many possible addresses are ignored. Thus, at any designated address, there is a substantial possibility that the source RGB value 42 will not match the PC-RGB value. In such cases, resort to color map 30 becomes necessary. To preserve memory space, color map 30 only contains a limited number of selected color values and corresponding color print engine control values. As a result, if a received PC-RGB value is not found in color map 30 (as is likely), an interpolation procedure is executed using bracketing color values from color map 30. This action, while enabling an interpolated color print engine control value to be determined, is time consuming and slows the performance of color laser printer 10.
In FIG. 2, a diagram illustrates further detail of the above-described procedure employed by color laser printer 10 in response to a received PC-RGB value 16. Microprocessor 22 accesses the lower-most four significant bits of each of the red, green, and blue bytes to create a 12 bit concatenated address value 40. Address value 40 is then used to access one of the positions within color cache 26.
Color cache 26 contains two entries at each 12 bit address, i.e., a xe2x80x9csourcexe2x80x9d RGB value 42 comprising three eight bit bytes of red, green, and blue values and an associated xe2x80x9cdestinationxe2x80x9d CMY color value which also comprises three color value bytes, which color values are employed to control color print engine 28 (FIG. 1). Different destination CMY color values 62 are required due to the fact that color print engine 28 operates in a xe2x80x9cditherxe2x80x9d mode to reproduce PC-RGB color values. The dither mode, in essence, calls for the interspersal of color dots of plural color values, which when viewed from a distance, appear to reproduce the desired PC-RGB value.
Initially (decision box 46), if it is determined that source RGB value entry 42 is equal to a received PC-RGB value, destination CMY color value 44 is returned to color print engine 28 (box 48). If however, source RGB value 42 is found not to match the PC-RGB value, then color map 30 is accessed at a source RGB color value that most closely matched the value in PC-RGB register 20. An interpolation procedure then obtains a destination CMY color value to be used to control color print engine 28 (box 50).
To update color cache 26 (box 52), the source RGB and destination CMY color values are replaced at the previously accessed address, as follows: the value in PC-RGB register 20 replaces source RGB value 42 at the address and the interpolated destination CMY color value replaces destination CMY color value 44. As a result of the described replacement procedure, color cache 26 is continually updated with newly interpolated values.
Color cache 26 is most effective when an image or document is printed which includes many slight variations of a particular color. When a color is varied slightly, the most significant bits of the color value remain unchanged and the least significant bits are altered. As color values with the same most significant bits are received and processed by color laser printer 10, color cache 26 is filled with the most of or all of the variations of the least significant bits. Thus any incoming color value with the same most significant bits will find a match in color cache 26.
According to principles of the present invention in a preferred embodiment, a color printer includes a palette color cache preloaded with predetermined palette colors. The palette color cache includes source and destination entries at each cache address. Each source entry includes values indicative of a computer generated color and each destination entry includes values usable by the color printer to reproduce the color indicated by the source entry.
According to further principles of the present invention, the color printer receives P, N-bit values indicating a computer generated color to be printed. Each N-bit value has a most significant bit (MSB). Upon receiving P, N-bit color values, the color printer creates an address from P combined multiple-bit segments of each of the received N-bit values, each multiple bit segment including at least a MSB of each N-bit value. A processor determines if there is a match at the address created from a received computer color value between a source entry and the received computer color value. The processor is responsive to a determined match to access the destination entry at the address and to employ the destination entry to control the color printer.
It has been noticed that many application provide a default color palette. The default color palette includes a collection of relatively few diverse colors used to decorate a document. These colors typically consist of primary and secondary colors, favorite colors, and a few shades of gray. The most significant bits for these colors usually vary widely. Since the most significant bits of the default palette colors are usually not the same, the prior art color cache is not very effective when using the colors from the default color palettes.
Other objects, advantages, and capabilities of the present invention will become more apparent as the description proceeds.